<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>table-list-add</title>
    <!-- 让IE8/9支持媒体查询，从而兼容栅格 -->
    <!--[if lt IE 9]>
    <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
    <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
    <link rel="stylesheet" href="./lib/layui/css/layui.css">
    <script type="text/javascript" src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
    <script type="text/javascript" src="./lib/layui/layui.js" charset="utf-8"></script>
    <link rel="stylesheet" href="./css/xadmin.css">
    <script src="js/config.js"></script>
    <script src="js/xadmin.js"></script>
    <script src="js/table-list-add.js"></script>

</head>
<body>
<div class="x-body">
    <form class="layui-form" action="">

        <div class="layui-form-item">
            <label class="layui-form-label">主题</label>
            <div class="layui-input-inline">
                <input type="text" name="theme" required lay-verify="required" placeholder="请输入标题" autocomplete="off"
                       class="layui-input">
            </div>
            <label class="layui-form-label">添加条件</label>
            <div class="layui-icon" id="add_condition_btn" onclick="add_condition()"
                 style="cursor: pointer; font-size: 36px; width: 30px; float: left;">&#xe857;
            </div>
            <!--<label class="layui-form-label">添加格子</label>-->
            <!--<div class="layui-icon" id="add_cell_btn" onclick="add_cell()"-->
            <!--style="cursor: pointer; font-size: 36px; width: 30px; float: left;">&#xe656;-->
            <!--</div>-->
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">分享链接</label>
            <div class="layui-input-inline">
                <input type="text" name="share_url" required lay-verify="required" placeholder="请输入" autocomplete="off"
                       class="layui-input">
            </div>
            <label class="layui-form-label">背景链接</label>
            <div class="layui-input-inline">
                <input type="text" name="background_url" required lay-verify="required" placeholder="请输入"
                       autocomplete="off"
                       class="layui-input">
            </div>
        </div>



        <div class="layui-form-item">
            <label class="layui-form-label">转盘链接</label>
            <div class="layui-input-inline">
                <input type="text" name="turntable_url" required lay-verify="required" placeholder="请输入"
                       class="layui-input">
            </div>
            <label class="layui-form-label">指针链接</label>
            <div class="layui-input-inline">
                <input type="text" name="pointer_url" required lay-verify="required"
                       class="layui-input">
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">开始时间</label>
            <div class="layui-input-inline">
                <input type="text" class="layui-input" name="begintime" id="begintime" required lay-verify="required">
            </div>
            <label class="layui-form-label">结束时间</label>
            <div class="layui-input-inline">
                <input type="text" class="layui-input" name="endtime" id="endtime" required lay-verify="required">
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">活动描述</label>
            <div class="layui-input-block">
                <textarea name="description" placeholder="请输入内容" class="layui-textarea"
                          required lay-verify="required"></textarea>
            </div>
        </div>

        <div class="layui-form-item">
            <div class="layui-input-inline" style="margin-left:36px">
                <!--此处必将button标签改为其它标签否则会干扰主表单的ajax请求-->
                <a class="layui-btn" lay-submit lay-filter="table_form">提交</a>
                <button type="reset" class="layui-btn layui-btn-primary">重置</button>
            </div>
        </div>
    </form>


    <div class="layui-form layui-hide" id="condition_open">
        <div class="layui-form-item">
            <label class="layui-form-label">条件类型</label>
            <input type="radio" name="condition_type" value="0" title="无条件" lay-filter="condition_radio">
            <input type="radio" name="condition_type" value="1" title="积分" checked lay-filter="condition_radio">
            <input type="radio" name="condition_type" value="2" title="商品" lay-filter="condition_radio">
        </div>
        <div id="condition_content">
            <div class="layui-form-item">
                <label class="layui-form-label">积分数</label>
                <div class="layui-input-inline">
                    <input type="text" name="points" required lay-verify="required|number"
                           placeholder="输入" autocomplete="off" class="layui-input">
                </div>
            </div>
        </div>
        <!--<div class="layui-form-item">-->
        <!--<input name="test" class="layui-input">-->
        <!--</div>-->
        <div class="layui-form-item">
            <div class="layui-input-inline" style="margin-left:36px">
                <button class="layui-btn" lay-submit lay-filter="condition_form">提交</button>
                <button type="reset" class="layui-btn layui-btn-primary">重置</button>
            </div>
        </div>
    </div>

</div>
<script>

</script>
</body>
</html>
